package com.clps.rulesregulations.dao;

import com.clps.rulesregulations.domain.AccessFile;
import com.clps.rulesregulations.domain.Role;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
@Mapper
public interface RoleDao {
    List<Role> findRolesByUserId(Integer userId);

    List<Role> findRolesByPage(Map<String, Object> condition);

    List<AccessFile> findAccessFileLogByPage(Map<String, Object> condition);

    void delRoleByRoleId(Integer roleId);

    void addRole(Role role);

    Role findRoleById(Integer roleId);

    void updateRole(Role role);

    List<Role> finAll();
}